var controller = {}
var base64 = require('js-base64').Base64;

controller.saveEdit = function(req, res, next){
    console.log(req.query.contain)
    var content = base64.encode(req.query.contain);
    console.log(content);
    var ql = 'update content set content = "' + content + '", time = "' + req.query.time + '" ' + 'where firstnav = "' + req.query.folder + '" and secondnav = "' + req.query.preview + '"'; 
    console.log(ql)
    conn.query(ql, function(err, results, fields){
        if(err) throw err;
        res.send({
            code: 200
        })
    })

}

module.exports = controller;